﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LcfContols
{
    /// <summary>
    /// 自定义下拉项
    /// </summary>
    public class LComboBoxItem
    {
        /// <summary>
        /// 显示项
        /// </summary>
        private string _displayValue;
        /// <summary>
        /// 实际值
        /// </summary>
        private object _valueValue;
        /// <summary>
        /// 搜索值
        /// </summary>
        private string _searchValue;

        /// <summary>
        /// 显示项
        /// </summary>
        public string Display
        {
            get { return _displayValue; }
            set { _displayValue = value; }
        }

        /// <summary>
        /// 搜索值
        /// </summary>
        public string Search
        {
            get { return _searchValue; }
            set { _searchValue = value; }
        }

        /// <summary>
        /// 实际值
        /// </summary>
        public object Value
        {
            get { return _valueValue; }
            set { _valueValue = value; }
        }

        public LComboBoxItem() { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="display">显示项</param>
        public LComboBoxItem(string display)
        {
            _displayValue = display;
            _valueValue = display;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="display">显示项</param>
        /// <param name="value">实际值</param>
        public LComboBoxItem(string display, object value)
        {
            _displayValue = display;
            _valueValue = value;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="display">显示项</param>
        /// <param name="value">实际值</param>
        /// <param name="search">搜索值</param>
        public LComboBoxItem(string display, object value, string search)
        {
            _displayValue = display;
            _valueValue = value;
            _searchValue = search;
        }

        public override string ToString()
        {
            return _displayValue;
        }
    }
}
